/*************************************************************************************************/
/*!
 *  \file   mesh_cfg_mdl_sr.h
 *
 *  \brief  Configuration Server internal module interface.
 *
 *  Copyright (c) 2010-2018 Arm Ltd. All Rights Reserved.
 *
 *  Copyright (c) 2019-2020 Packetcraft, Inc.
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
/*************************************************************************************************/

#ifndef MESH_CFG_MDL_SR_H
#define MESH_CFG_MDL_SR_H

#ifdef __cplusplus
extern "C"
{
#endif

/**************************************************************************************************
  Data types
**************************************************************************************************/

/*! State changed notification callback for friendship module. */
typedef void (*meshCfgMdlSrFriendStateChgCback_t)(void);

/*! NetKey deleted notification callback. */
typedef void (*meshCfgMdlSrNetKeyDelNotifyCback_t)(uint16_t netKeyIndex);

/*! Poll Timeout Timer read callback for friendship module. */
typedef uint32_t (*meshCfgMdlSrPollTimeoutGetCback_t) (meshAddress_t lpnAddr);

/**************************************************************************************************
  Function Declarations
**************************************************************************************************/

/*************************************************************************************************/
/*!
 *  \brief     Registers friend state changed notification callback.
 *
 *  \param[in] friendStateChgCback   Friendship state changed callback.
 *  \param[in] netKeyDelNotifyCback  NetKey deleted notification callback.
 *  \param[in] pollTimeoutGetCback   Poll Timeout get callback.
 *
 *  \return    None.
 */
/*************************************************************************************************/
void MeshCfgMdlSrRegisterFriendship(meshCfgMdlSrFriendStateChgCback_t friendStateChgCback,
                                    meshCfgMdlSrNetKeyDelNotifyCback_t netKeyDelNotifyCback,
                                    meshCfgMdlSrPollTimeoutGetCback_t pollTimeoutGetCback);

#ifdef __cplusplus
}
#endif

#endif /* MESH_CFG_MDL_SR_H */
